package com.cbd.pojo;

import java.io.Serializable;
import java.util.*;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.hibernate.annotations.ForeignKey;
import org.hibernate.validator.constraints.Length;
import org.hibernate.validator.constraints.NotEmpty;
import org.springframework.validation.annotation.Validated;

import com.fasterxml.jackson.annotation.JsonIgnoreProperties;

/**
 * 包租婆表
 * 
 */
@Entity
@Table(name="landLady")
@Validated
public class Landlady implements Serializable{

	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	@Column(name="ladyID")
	private int ladyID;
	/**
	 * 包租婆真实姓名
	 * 
	 */
	@Column(name="ladyName")
	@NotEmpty(message="不能为空")
	@Length(max=8,min=2,message="长度必须为2-8位之间")
	private String ladyName;
	/**
	 * 包租婆电话 长度11位
	 * 
	 */
	@Column(name="ladyTel")
	@NotEmpty(message="不能为空")
	@Length(max=11,min=11,message="长度必须为11位")
	private String ladyTel;
	/**
	 * 身份证号 长度18位
	 * 
	 */
	@Column(name="ladyCard")
	@NotEmpty(message="不能为空")
	@Length(max=18,min=18,message="长度必须为18位")
	private String ladyCard;
	/**
	 * 家庭住址
	 * 
	 */
	@Column(name="ladyAddress")
	@NotEmpty(message="不能为空")
	@Length(max=20,min=3,message="长度必须为3-20位")
	private String ladyAddress;
	/**
	 * 职业描述
	 * 
	 */
	@Column(name="ladyDescribe")
	@NotEmpty(message="不能为空")
	@Length(max=30,min=3,message="长度必须为3-30位")
	private String ladyDescribe;
	/**
	 * 是否审批 0：还没有通过审批false  1:true 通过
	 * 
	 */
	@Column(name="ladyType")
	private boolean ladyType;
	/**
	 * 信誉度
	 * 
	 */
	@Column(name="ladyRP")
	private String ladyRP;
	/**
	 * 注册时间
	 * 
	 */
	@Column(name="ladyTime")
	private java.util.Date ladyTime;
	@OneToMany(cascade=CascadeType.ALL,mappedBy="landlady",fetch=FetchType.LAZY)
	private List<Personalcarport> personalcarport;
	@OneToOne(cascade=CascadeType.ALL)
	@JoinColumn(name="userID")
	private User user;

	public int getLadyID() {
		return ladyID;
	}

	public void setLadyID(int ladyID) {
		this.ladyID = ladyID;
	}

	public String getLadyName() {
		return ladyName;
	}

	public void setLadyName(String ladyName) {
		this.ladyName = ladyName;
	}

	public String getLadyTel() {
		return ladyTel;
	}

	public void setLadyTel(String ladyTel) {
		this.ladyTel = ladyTel;
	}

	public String getLadyCard() {
		return ladyCard;
	}

	public void setLadyCard(String ladyCard) {
		this.ladyCard = ladyCard;
	}

	public String getLadyAddress() {
		return ladyAddress;
	}

	public void setLadyAddress(String ladyAddress) {
		this.ladyAddress = ladyAddress;
	}

	public String getLadyDescribe() {
		return ladyDescribe;
	}

	public void setLadyDescribe(String ladyDescribe) {
		this.ladyDescribe = ladyDescribe;
	}

	public boolean isLadyType() {
		return ladyType;
	}

	public void setLadyType(boolean ladyType) {
		this.ladyType = ladyType;
	}

	public String getLadyRP() {
		return ladyRP;
	}

	public void setLadyRP(String ladyRP) {
		this.ladyRP = ladyRP;
	}

	public java.util.Date getLadyTime() {
		return ladyTime;
	}

	public void setLadyTime(java.util.Date ladyTime) {
		this.ladyTime = ladyTime;
	}

	public List<Personalcarport> getPersonalcarport() {
		return personalcarport;
	}

	public void setPersonalcarport(List<Personalcarport> personalcarport) {
		this.personalcarport = personalcarport;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

}